package com.apanal.qlife.advice.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.apanal.qlife.advice.model.Advice;
import com.apanal.qlife.common.page.Page;
import com.apanal.qlife.org.model.Organization;

 public interface AdviceMapper {
	int deleteByPrimaryKey(Long advId);

	int insert(Advice record);

	int insertSelective(Advice record);

	Advice selectByPrimaryKey(Long advId);

	int updateByPrimaryKeySelective(Advice record);

	int updateByPrimaryKey(Advice record);

	/**
	 * 查询系统公告总数
	 * 
	 * @param entity
	 * @param page
	 * @return
	 */
	int selectRelationForPageCount(@Param(value = "e") Advice advice, @Param(value = "p") Page page);

	List<Advice> selectRelationForPage(@Param(value = "e") Advice advice, @Param(value = "p") Page page);

	int selectRelationInformForPageCount(@Param(value = "e")Advice advice, @Param(value = "p") Page page);

	List<Advice> selectRelationInfromForPage(@Param(value = "e")Advice advice,  @Param(value = "p") Page page);

	int selectAppForPageCount(@Param(value = "e")Advice advice,@Param(value = "p") Page page);

	List<Advice> selecAppForPage(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	Advice selectAppAnnouceDtail(@Param(value = "e")Advice advice);

	int selectRelationForPageCountNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	List<Advice> selectRelationForPageNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	int selectRelationInformForPageCountNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	List<Advice> selectRelationInfromForPageNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	int selectAppForPageCountNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	List<Advice> selecAppForPageNo(@Param(value = "e")Advice advice, @Param(value = "p")Page page);

	int selectMessAonnucePageCount(@Param(value = "e")Advice advice,  @Param(value = "p")Page page,  @Param(value = "o")Organization org);

	List<Advice> selectMessAonnucePage(@Param(value = "e")Advice advice, @Param(value = "p")Page page,@Param(value = "o")Organization org);

	int selectMessInformPageCount(@Param(value = "e")Advice advice, @Param(value = "p")Page page, @Param(value = "o")Organization org);

	List<Advice> selectMessInformPage(@Param(value = "e")Advice advice, @Param(value = "p")Page page, @Param(value = "o")Organization org);

	
	int selectAnnForPageCount(@Param(value = "e")Advice advice, @Param(value = "p")Page page, @Param(value = "o")Organization org);

	List<Advice> selectAnnForPage(@Param(value = "e")Advice advice, @Param(value = "p")Page page, @Param(value = "o")Organization org);


}